package code17_reflect;

import java.io.Serializable;


@Deprecated
//调用无参构造, 此时可以省略 ()
//@MyAnn01()
public class Stu extends Person implements Serializable, Cloneable {
	@MyAnn01(age = 20, value = "stu-name")
	@Value("stuName")
	public String name;
	
	@Value("stuAge")
	private int age;
	
	public void study(String book, int minute){
		System.out.println("Stu.study("+book+", "+minute+")");
	}
	private double talk(String msg){
		System.out.println("Stu.talk("+msg+")");
		return Math.random();
	}
	public Stu() {
	}
	public Stu(String name, int age) {
		this.name = name;
		this.age = age;
	}
	private Stu(int age, String name) {
		this.name = name;
		this.age = age;
		System.out.println("Stu.Stu(int age, String name)");
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	@Override
	public String toString() {
		return "Stu [name=" + name + ", age=" + age + "]";
	}
}
